﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Traffic.aspx.cs" Inherits="Microsoft.Live.ServerControls.Web.ClientSideExtenders._Traffic" %>
<%@ Register Namespace="Microsoft.Live.ServerControls.VE" Assembly="Microsoft.Live.ServerControls.VE" TagPrefix="cc" %>
<%@ Register Namespace="Microsoft.Live.ServerControls.VE.Extenders" Assembly="Microsoft.Live.ServerControls.VE" TagPrefix="cx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Virtual Earth Server Control</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <div style="float:left;width:400px;">
        <cc:map ID="myMap" runat="server" ZoomLevel="10" >
            <Center Latitude="47.64075" Longitude="-122.12909" />
        </cc:map>     </div>
    <div style="float:left;width:400px;">
        <h3>Traffic Client Side Extenders</h3>  
        <asp:LinkButton ID="ToggleTraffic" runat="server" Text="Toggle Traffic"></asp:LinkButton>
        <asp:LinkButton ID="ShowTraffic" runat="server" Text="Show Traffic"></asp:LinkButton>
        <asp:LinkButton ID="HideTraffic" runat="server" Text="Hide Traffic"></asp:LinkButton>
        <cx:Traffic ID="ToggleTrafficExtender" runat="server" TargetControlID="ToggleTraffic" MapControlID="myMap" ToggleTraffic="true" />
        <cx:Traffic ID="ShowTrafficExtender" runat="server" TargetControlID="ShowTraffic" MapControlID="myMap" ShowTraffic="true" />
        <cx:Traffic ID="HideTrafficExtender" runat="server" TargetControlID="HideTraffic" MapControlID="myMap" HideTraffic="true" />
        <br />
        <asp:LinkButton ID="ToggleTrafficLegend" runat="server" Text="Toggle Traffic Legend"></asp:LinkButton>
        <asp:LinkButton ID="ShowTrafficLegend" runat="server" Text="Show Traffic Legend"></asp:LinkButton>
        <asp:LinkButton ID="HideTrafficLegend" runat="server" Text="Hide Traffic Legend"></asp:LinkButton>
        <cx:Traffic ID="ToggleTrafficLegendExtender" runat="server" TargetControlID="ToggleTrafficLegend" MapControlID="myMap" ToggleTrafficLegend="true" />
        <cx:Traffic ID="ShowTrafficLegendExtender" runat="server" TargetControlID="ShowTrafficLegend" MapControlID="myMap" ShowTrafficLegend="true" />
        <cx:Traffic ID="HideTrafficLegendExtender" runat="server" TargetControlID="HideTrafficLegend" MapControlID="myMap" HideTrafficLegend="true" />
        <br />
        <asp:LinkButton ID="SetTrafficLegendText" runat="server" Text="Set Traffic Legend Text"></asp:LinkButton>
        <cx:Traffic ID="SetTrafficLegendTextExtender" runat="server" TargetControlID="SetTrafficLegendText" MapControlID="myMap" TrafficLegendText="My Legend" />
        <br />
        <asp:LinkButton ID="ALL" runat="server" Text="Toggle Traffic, Legend and set Text"></asp:LinkButton>
         <cx:Traffic ID="ALLExtender" runat="server" TargetControlID="ALL" MapControlID="myMap" ToggleTraffic="true" ToggleTrafficLegend="true" TrafficLegendText="My Legend ALL" />
   </div>
    </form>
</body>
</html>
